10th international ABINIT developer workshop
May 31 - June 4, 2021 - Smart Working, Lockdown@BE

Use the Space key to navigate through all slides and SHIFT + Space key to go back one slide.

NB: AbiPy can be interfaced with other packages (e.g ASE, phonopy) via converters.
Using conda and the conda forge channel (recommended):
conda install abipy --channel conda-forge
Since conda is not limited to python packages, one can install ABINIT in the same env with:
conda install abinit -c conda-forge
Using pip and python wheels:
pip install abipy --user
For further info see this installation howto
%embed https://nbviewer.jupyter.org/github/abinit/abitutorials/blob/master/abitutorials/index.ipynb

Since AbiPy is not restricted to high-throughput, we'll show how to use the terminal to analyze calculations
Well, a python script would be much more flexible but the goal here is to show that one can replace grep, vim, gnuplot with AbiPy
abistruct.py --help for manpageabistruct.py COMMAND --help for help about COMMANDHTML documentation available at http://abinit.github.io/abipy/scripts/index.html
abistruct.py spglib si_scf_GSR.nc
abistruct.py convert si_scf_GSR.nc -f cif
abiopen.py si_scf_GSR.nc --print

!abiopen.py si_scf_GSR.nc --print
================================= File Info =================================
Name: si_scf_GSR.nc
Directory: /Users/gmatteo/git_repos/abipy_imec_2022
Size: 14.83 kb
Access Time: Mon Jun 6 23:58:53 2022
Modification Time: Mon Jun 6 23:53:36 2022
Change Time: Mon Jun 6 23:53:36 2022
================================= Structure =================================
Full Formula (Si2)
Reduced Formula: Si
abc : 3.866975 3.866975 3.866975
angles: 60.000000 60.000000 60.000000
Sites (2)
# SP a b c cartesian_forces
--- ---- ---- ---- ---- -----------------------------------------------------------
0 Si 0 0 0 [-5.89948306e-27 -1.93366149e-27 2.91016904e-27] eV ang^-1
1 Si 0.25 0.25 0.25 [ 5.89948306e-27 1.93366149e-27 -2.91016904e-27] eV ang^-1
Abinit Spacegroup: spgid: 227, num_spatial_symmetries: 48, has_timerev: True, symmorphic: True
Stress tensor (Cartesian coordinates in GPa):
[[5.21161758e+00 7.86452261e-11 0.00000000e+00]
[7.86452261e-11 5.21161758e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00 5.21161758e+00]]
Pressure: -5.212 (GPa)
Energy: -241.23647031 (eV)
============================== Electronic Bands ==============================
Number of electrons: 8.0, Fermi level: 5.598 (eV)
nsppol: 1, nkpt: 29, mband: 8, nspinor: 1, nspden: 1
smearing scheme: none (occopt 1), tsmear_eV: 0.272, tsmear Kelvin: 3157.7
Direct gap:
Energy: 2.532 (eV)
Initial state: spin: 0, kpt: [+0.000, +0.000, +0.000], weight: 0.002, band: 3, eig: 5.598, occ: 2.000
Final state: spin: 0, kpt: [+0.000, +0.000, +0.000], weight: 0.002, band: 4, eig: 8.130, occ: 0.000
Fundamental gap:
Energy: 0.562 (eV)
Initial state: spin: 0, kpt: [+0.000, +0.000, +0.000], weight: 0.002, band: 3, eig: 5.598, occ: 2.000
Final state: spin: 0, kpt: [+0.375, +0.375, +0.000], weight: 0.012, band: 4, eig: 6.161, occ: 0.000
Bandwidth: 11.856 (eV)
Valence maximum located at kpt index 0:
spin: 0, kpt: [+0.000, +0.000, +0.000], weight: 0.002, band: 3, eig: 5.598, occ: 2.000
Conduction minimum located at kpt index 17:
spin: 0, kpt: [+0.375, +0.375, +0.000], weight: 0.012, band: 4, eig: 6.161, occ: 0.000
TIP: Use `--verbose` to print k-point coordinates with more digits
abiopen.py mgb2_kpath_FATBANDS.nc --expose --seaborn

abiopen.py gs_dfpt.abo --expose --seaborn
abiopen.py out_GRUNS.nc --expose-web # -ew for the short version

!abistruct.py convert si_scf_GSR.nc -f cif
# generated using pymatgen data_Si _symmetry_space_group_name_H-M 'P 1' _cell_length_a 3.86697464 _cell_length_b 3.86697464 _cell_length_c 3.86697464 _cell_angle_alpha 60.00000000 _cell_angle_beta 60.00000000 _cell_angle_gamma 60.00000000 _symmetry_Int_Tables_number 1 _chemical_formula_structural Si _chemical_formula_sum Si2 _cell_volume 40.88829233 _cell_formula_units_Z 2 loop_ _symmetry_equiv_pos_site_id _symmetry_equiv_pos_as_xyz 1 'x, y, z' loop_ _atom_site_type_symbol _atom_site_label _atom_site_symmetry_multiplicity _atom_site_fract_x _atom_site_fract_y _atom_site_fract_z _atom_site_occupancy Si Si0 1 0.00000000 0.00000000 0.00000000 1 Si Si1 1 0.25000000 0.25000000 0.25000000 1
!abistruct.py kpath si_scf_GSR.nc
/Users/gmatteo/git_repos/pymatgen/pymatgen/symmetry/kpath.py:179: UserWarning: The input structure does not match the expected standard primitive! The path can be incorrect. Use at your own risk.
warn(
# Abinit Structure
natom 2
ntypat 1
typat 1 1
znucl 14
xred
0.0000000000 0.0000000000 0.0000000000
0.2500000000 0.2500000000 0.2500000000
acell 1.0 1.0 1.0
rprim
6.3285005521 0.0000000000 3.6537614973
2.1095001840 5.9665675402 3.6537614973
0.0000000000 0.0000000000 7.3075229946
# tolwfr 1e-20 iscf -2 # NSCF run
# To read previous DEN file, use: getden -1 or specify filename via getden_path "out_DEN"
# K-path in reduced coordinates:
ndivsm 10
kptopt -11
kptbounds
+0.00000 +0.00000 +0.00000 # $\Gamma$
+0.50000 +0.00000 +0.50000 # X
+0.50000 +0.25000 +0.75000 # W
+0.37500 +0.37500 +0.75000 # K
+0.00000 +0.00000 +0.00000 # $\Gamma$
+0.50000 +0.50000 +0.50000 # L
+0.62500 +0.25000 +0.62500 # U
+0.50000 +0.25000 +0.75000 # W
+0.50000 +0.50000 +0.50000 # L
+0.37500 +0.37500 +0.75000 # K
+0.62500 +0.25000 +0.62500 # U
+0.50000 +0.00000 +0.50000 # X
!abistruct.py mp_match si_scf_GSR.nc
# Found 2 structures in Materials Project database (use `verbose` to get further info)
########################### abivars input for this ###########################
# Full Formula (Si2)
# Reduced Formula: Si
# abc : 3.866975 3.866975 3.866975
# angles: 60.000000 60.000000 60.000000
#
# Spglib space group info (magnetic symmetries not taken into account).
# Spacegroup: Fd-3m (227), Hall: F 4d 2 3 -1d, Abinit spg_number: 227
# Crystal_system: cubic, Lattice_type: cubic, Point_group: m-3m
#
# Idx Symbol Reduced_Coords Wyckoff EqIdx
# ----- -------- -------------------------- --------- -------
# 0 Si +0.00000 +0.00000 +0.00000 (2a) 0
# 1 Si +0.25000 +0.25000 +0.25000 (2a) 0
natom 2
ntypat 1
typat 1 1
znucl 14
xred
0.0000000000 0.0000000000 0.0000000000
0.2500000000 0.2500000000 0.2500000000
acell 1.0 1.0 1.0
rprim
6.3285005521 0.0000000000 3.6537614973
2.1095001840 5.9665675402 3.6537614973
0.0000000000 0.0000000000 7.3075229946
########################## abivars input for mp-149 ##########################
# Full Formula (Si2)
# Reduced Formula: Si
# abc : 3.866975 3.866975 3.866975
# angles: 60.000000 60.000000 60.000000
#
# Spglib space group info (magnetic symmetries not taken into account).
# Spacegroup: Fd-3m (227), Hall: F 4d 2 3 -1d, Abinit spg_number: None
# Crystal_system: cubic, Lattice_type: cubic, Point_group: m-3m
#
# Idx Symbol Reduced_Coords Wyckoff EqIdx
# ----- -------- -------------------------- --------- -------
# 0 Si +0.25000 +0.25000 +0.25000 (2b) 0
# 1 Si +0.00000 +0.00000 +0.00000 (2b) 0
natom 2
ntypat 1
typat 1 1
znucl 14
xred
0.2500000000 0.2500000000 0.2500000000
0.0000000000 0.0000000000 0.0000000000
acell 1.0 1.0 1.0
rprim
0.0000000000 5.1671990850 5.1671990850
5.1671990850 0.0000000000 5.1671990850
5.1671990850 5.1671990850 0.0000000000

abiview.py ddb ZnSe_hex_qpt_DDB --seaborn

!abiview.py --help
usage: abiview.py [-h] [-V]
{structure,hist,data,dirviz,ebands,skw,fs,ifermi_fs,ddb,ddb_vs,ddb_ir,ddb_asr,ddb_dipdip,ddb_quad,ddb_isodistort_ph,ddb_ifc,ddb_qpt,phbands,lobster,denpot}
...
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
subcommands:
Valid subcommands
{structure,hist,data,dirviz,ebands,skw,fs,ifermi_fs,ddb,ddb_vs,ddb_ir,ddb_asr,ddb_dipdip,ddb_quad,ddb_isodistort_ph,ddb_ifc,ddb_qpt,phbands,lobster,denpot}
sub-command help
structure Visualize the structure with the specified visualizer.
Requires external app or optional python modules
(mayavi, vtk)
hist Visualize structural relaxation/molecular-dynamics run
from data stored in the HIST.nc file. Requires mayavi.
data Extract data from a generic text file with results in
tabular format and plot data with matplotlib. Multiple
datasets are supported. No attempt is made to handle
metadata (e.g. column name)
dirviz Visualize directory tree with graphviz.
ebands Plot electronic bands if file contains high-symmetry
k-path or DOS if k-sampling. Accept any file with
ElectronBands e.g. GSR.nc, WFK.nc, ...
skw Interpolate energies in k-space along a k-path with
star-function methods Note that the interpolation will
likely fail if there are symmetrical k-points in the
input set of k-points so it's recommended to call this
method with energies obtained in the IBZ. Accept any
file with ElectronBands e.g. GSR.nc, WFK.nc, ...
fs Extract eigenvalues in the IBZ from file and visualize
Fermi surface with the external application specified
via --appname
ifermi_fs Use ifermi package to visualize the Fermi surface.
Requires netcdf file with energies in the IBZ. See
<https://fermisurfaces.github.io/IFermi/>
ddb Invoke Anaddb to compute phonon bands and DOS from the
DDB, plot the results.
ddb_vs Compute speed of sound by fitting phonon frequencies
along selected directions.
ddb_ir Compute infra-red spectrum from DDB. Plot results.
ddb_asr Compute phonon band structure from DDB with/without
acoustic sum rule. Plot results.
ddb_dipdip Compute phonon band structure from DDB with/without
dipole-dipole interaction. Plot results.
ddb_quad Compute phonon band structure from DDB with/without
quadrupole terms. Plot results.
ddb_isodistort_ph Compute ph-freqs for given q-point (default: Gamma),
produce CIF files for unperturbed and distorded
structure that can be used with ISODISTORT
(https://stokes.byu.edu/iso/isodistort.php) to analyze
the symmetry of phonon modes. See README.me file
produced in output directory.
ddb_ifc Visualize interatomic force constants in real space.
ddb_qpt Compute ph-frequencies at the selected q-point without
passing through the Fourier interpolation of the
interatomic force constants.
phbands Plot phonon bands. Accept any file with PhononBands
e.g. PHBST.nc, ...
lobster Analyze lobster output files in directory.
denpot Visualize netcdf DEN/POT files with --appname
(default: Vesta). NB: Appplication must be installed
and in $PATH.
Usage example:
###########
# Structure
###########
abiview.py structure FILE ==> Visualize structure with Vesta (default)
abiview.py structure FILE -a xcrysden ==> Visualize structure with Xcrysden (default)
abiview.py hist out_HIST.nc ==> Plot relaxation/molecular dynamics results with matplotlib.
abiview.py hist out_HIST.nc -a ovito ==> Visualize relaxation/molecular dynamics results with ovito.
abiview.py hist out_HIST.nc --xdatcar ==> Convert HIST.nc into XDATCAR format (caveat: assume fixed unit cell!)
############
# Text files
############
abiview.py data FILE ==> Parse text FILE with data in tabular format and plot arrays.
###########
# Electrons
###########
abiview.py ebands out_WFK.nc ==> Plot electrons bands (or DOS) with matplotlib.
abiview.py ebands out_GSR.nc --xmgrace ==> Generate xmgrace file with electron bands.
abiview.py fs FILE_WITH_KMESH.nc ==> Visualize Fermi surface from netcdf file with electron energies
on a k-mesh. Use -a xsf to change application e.g. Xcrysden.
abiview.py skw out_GSR.nc ==> Interpolate IBZ energies with star-functions and plot
interpolated bands.
abiview.py denpot out_DEN.nc ==> Visualize DEN/POT file with Vesta. Use `-a xcrysden` to change app.
abiview.py denpot out_DEN.nc --chgcar ==> Convert DEN file to CHGCAR fileformat.
#########
# Phonons
#########
abiview.py ddb in_DDB ==> Compute ph-bands and DOS from DDB, plot results.
abiview.py ddb_vs ==> Compute speed of sound from DDB by fitting phonon frequencies.
abiview.py ddb_ir ==> Compute infra-red spectrum from DDB. Plot results.
abiview.py ddb_asr ==> Compute ph-bands from DDB with/wo acoustic rule.
Plot results with matplotlib (default) or plotly (--plotly)
abiview.py ddb_asr --plotly -cs ==> Compute ph-bands from DDB with/wo acoustic rule.
Plot results with plotly and push figure
to plotly chart studio cloud. See: https://chart-studio.plotly.com
abiview.py ddb_dipdip ==> Compute ph-bands from DDB with/wo dipole-dipole treatment.
Plot results with matplotlib (default) or plotly (--plotly)
abiview.py ddb_quad ==> Compute ph-bands from DDB with/wo dipole-quadrupole terms.
Plot results with matplotlib (default) or plotly (--plotly)
abiview.py ddb_qpt -q 0 0.5 0 ==> Compute ph-frequencies at the selected q-point without passing
through the Fourier interpolation of the interatomic force constants.
abiview.py ddb_ifc ==> Visualize interatomic force constants in real space.
abiview.py phbands out_PHBST.nc -web ==> Visualize ph-bands and displacements with phononwebsite.
###############
# Miscelleanous
###############
abiview.py dirviz DIRECTORY ==> Visualize directory tree with graphviz.
abiview.py lobster DIRECTORY ==> Visualize Lobster results.
Use `abiview.py --help` for help and `abiview.py COMMAND --help` to get the documentation for `COMMAND`.
Use `-v` to increase verbosity level (can be supplied multiple times e.g -vv).

!abicomp.py structure *.cif si_nscf_GSR.nc *_DDB
Spglib options: symprec= 0.001 angle_tolerance= 5.0
Lattice parameters:
formula natom alpha beta gamma a b \
AlAs.cif Al1 As1 2 60.0 60.0 60.0 3.970101 3.970101
si.cif Si2 2 60.0 60.0 60.0 3.866975 3.866975
si_nscf_GSR.nc Si2 2 60.0 60.0 60.0 3.866975 3.866975
ZnSe_hex_qpt_DDB Zn2 Se2 4 90.0 90.0 120.0 4.050187 4.050187
alas_DDB Al1 As1 2 60.0 60.0 60.0 3.970101 3.970101
elastic_DDB Al2 As2 4 90.0 90.0 120.0 3.989448 3.989448
c volume abispg_num spglib_symb spglib_num \
AlAs.cif 3.970101 44.247584 None F-43m 216
si.cif 3.866975 40.888292 None Fd-3m 227
si_nscf_GSR.nc 3.866975 40.888292 227 Fd-3m 227
ZnSe_hex_qpt_DDB 6.652328 94.504936 0 P6_3mc 186
alas_DDB 3.970101 44.247584 0 F-43m 216
elastic_DDB 6.497130 89.552529 0 P6_3mc 186
spglib_lattice_type
AlAs.cif cubic
si.cif cubic
si_nscf_GSR.nc cubic
ZnSe_hex_qpt_DDB hexagonal
alas_DDB cubic
elastic_DDB hexagonal

gsr = abiopen("si_nscf_GSR.nc")
gsr.ebands.plot(with_gaps=True);
gsr.ebands.plotly(with_gaps=True); # obj.plot becomes obj.plotly
gsr.ebands.plotly(with_gaps=True, chart_studio=True);

gsr.ebands.kpoints.plotly(title="k-path in 3d with plotly");
znse_ddb = abilab.abiopen("ZnSe_hex_qpt_DDB")
phbst_file, phdos_file = znse_ddb.anaget_phbst_and_phdos_files()
phbands, phdos = phbst_file.phbands, phdos_file.phdos
phbands.plotly_with_phdos(phdos, units="cm-1", title="ZnSe Phonon bands + DOS in cm-1");
paths = [
"mgb2_888k_0.01tsmear_DDB",
"mgb2_888k_0.04tsmear_DDB",
"mgb2_121212k_0.01tsmear_DDB",
"mgb2_121212k_0.04tsmear_DDB",
]
paths = [os.path.join(abidata.dirpath, "refs", "mgb2_phonons_nkpt_tsmear", f)
for f in paths]
robot = abilab.DdbRobot()
for i, path in enumerate(paths):
robot.add_file(path, path)
# Define function to change labels:
func = lambda ddb: "nkpt: %s, tsmear: %.2f" % (
ddb.header["nkpt"], ddb.header["tsmear"])
robot.remap_labels(func)
robot
robot.get_params_dataframe()
| nkpt | nsppol | ecut | tsmear | occopt | ixc | nband | usepaw | |
|---|---|---|---|---|---|---|---|---|
| nkpt: 256, tsmear: 0.01 | 256 | 1 | 35.0 | 0.01 | 4 | 1 | 8 | 0 |
| nkpt: 256, tsmear: 0.04 | 256 | 1 | 35.0 | 0.04 | 4 | 1 | 8 | 0 |
| nkpt: 864, tsmear: 0.01 | 864 | 1 | 35.0 | 0.01 | 4 | 1 | 8 | 0 |
| nkpt: 864, tsmear: 0.04 | 864 | 1 | 35.0 | 0.04 | 4 | 1 | 8 | 0 |
robot.get_lattice_dataframe()
| formula | natom | alpha | beta | gamma | a | b | c | volume | abispg_num | spglib_symb | spglib_num | spglib_lattice_type | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| nkpt: 256, tsmear: 0.01 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
| nkpt: 256, tsmear: 0.04 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
| nkpt: 864, tsmear: 0.01 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
| nkpt: 864, tsmear: 0.04 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
# Invoke anaddb and store results
r = robot.anaget_phonon_plotters(nqsmall=2)
r.phbands_plotter.gridplot_with_hue("tsmear", with_dos=True);

NB: There's an ongoing effort to reimplement AbiFlows in terms of the atomate framework. In this talk, we will mainly discuss the new features available in abipy.flowtk.
scheduler.yml providing:
manager.yml providing:
See this page for examples or use the abidoc.py script and the syntax:
# %load ~/.abinit/abipy/manager.yml
qadapters:
-
priority: 1
queue:
qname: gmac
qtype: shell
job:
mpi_runner: mpirun
pre_run:
#- export OMP_NUM_THREADS=1
#- export PATH=$HOME/git_repos/abinit/_build/src/98_main:$PATH
- ulimit -n 2048
- source ~/env.sh
#- source ~/miniconda3/bin/activate test_abinit
#- export PATH=$HOME/git_repos/abinit/_build/src/98_main:$PATH
limits:
min_cores: 1
max_cores: 2
timelimit: 0:10:0
hardware:
num_nodes: 1
sockets_per_node: 1
cores_per_socket: 2
mem_per_node: 4 Gb
# Optional
#condition: {"$eq": {omp_threads: 2}}
# %load ~/.abinit/abipy/scheduler.yml
# The launcher will stop submitting jobs when the
# number of jobs in the queue is >= Max number of jobs
max_njobs_inqueue: 2
# Maximum number of cores that can be used by the scheduler.
max_ncores_used: 2
# number of weeks to wait.
#weeks: 0
# number of days to wait.
#days: 0
# number of hours to wait.
#hours: 0
# number of minutes to wait.
#minutes: 0
# number of seconds to wait.
seconds: 8
# when to first execute the job and start the counter (default is after the given interval).
#start_date:
# Send mail to the specified address (accepts string or list of strings).
# PRO TIP: the scheduler WILL try to send and email after a default time of 4 days. If you
# comment out the mailto address, this will cause the scheduler to terminate, with
# potentially nefarious effects on your running jobs. If you do not wish to receive
# emails, a work around is to set the variable `remindme_s` below to something very
# large (say, 100 days).
#mailto: nobody@nowhere.com
# verbosity level (int, default 0)
#verbose: 0
# The scheduler will shutdown when the number of python exceptions is > max_num_pyexcs
#max_num_pyexcs: 2
# The scheduler will shutdown when the number of Abinit errors is > max_num_abierrs
#max_num_abierrs: 0
# The scheduler will shutdow when the total number of tasks launched is > safety_ratio * tot_num_tasks.
#safety_ratio: 5
# Send an e-mail to mailto every remindme_s seconds.
#remindme_s: 345600
def make_scf_input(ecut=2, ngkpt=(4, 4, 4)):
"""
Generate an `AbinitInput` to perform GS calculation for AlAs.
Args:
ecut: Cutoff energy in Ha.
ngkpt: k-mesh divisions
Return:
`AbinitInput` object
"""
gs_inp = abilab.AbinitInput(structure="AlAs.cif",
pseudos=["13al.pspnc", "33as.pspnc"])
# Set the value of the Abinit variables needed for GS runs.
gs_inp.set_vars(
nband=4,
ecut=ecut,
ngkpt=ngkpt,
nshiftk=4,
shiftk=[0.0, 0.0, 0.5, # This gives the usual fcc Monkhorst-Pack grid
0.0, 0.5, 0.0,
0.5, 0.0, 0.0,
0.5, 0.5, 0.5],
tolvrs=1.0e-10,
)
return gs_inp
make_scf_input()
AbiniInput one can easily build more complicate workflows:¶def build_flow_alas_phonons():
"""
Build and return a Flow to compute the dynamical matrix on a (2, 2, 2) qmesh
as well as DDK and Born effective charges.
The final DDB with all perturbations will be merged automatically and placed
in the Flow `outdir` directory.
"""
from abipy import flowtk
scf_input = make_scf_input(ecut=6, ngkpt=(4, 4, 4))
return flowtk.PhononFlow.from_scf_input("flow_alas_phonons", scf_input,
ph_ngqpt=(2, 2, 2), with_becs=True)
flow_phbands = build_flow_alas_phonons()
flow_phbands.get_graphviz()

Compute $\epsilon^{\alpha\beta}_{n\bf{k}}$ and the effective mass tensor at the band edges using $|u_{n\mathbf{k}}\rangle$, and the k-derivatives $|u_{n\mathbf{k}}^\alpha\rangle$ $H^\alpha_{\mathbf{k}}$, $H^{\alpha\beta}_{\mathbf{k}}$
For the formalism, see J. Laflamme Janssen, et. al. Phys. Rev. B 93, 205147
flow = flowtk.Flow("flow_effmass_dfpt")
# Build input for GS SCF calculation.
scf_input = make_scf_input()
# This object implements all the worflow logic
from abipy.flowtk.effmass_works import EffMassAutoDFPTWork
work = EffMassAutoDFPTWork.from_scf_input(scf_input)
flow.register_work(work)

from abipy.abio.factories import gs_input
gs_input(structure="si.cif", pseudos="14si.pspnc", ecut=8)
other_inp = abilab.AbinitInput(structure="si.cif", pseudos="14si.pspnc")
other_inp.set_vars(ecut=8, nsppol=2, toldfe=1e-8)
other_inp.set_autokmesh(8)
other_inp
The simplest way to start the scheduler from the shell is via the syntax:
run_elastic.py --scheduler # -s for the short option
For non-trivial Flows, we suggest to put the scheduler in background and use nohup
so that we can disconnect from the shell session without killing the scheduler.
nohup run_elastic.py --s > log 2> err &
Obviously, it is possible to submit a Slurm script that executes the script on the compute note with 1 core.
To interact with the Flow, one can also use the abirun.py script, e.g:
abirun.py FLOWDIR status